﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<PorteringManagement.Model.Itinerary>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Itinerarios
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Lista de Itinerarios</h2>

<p>
    <%: Html.ActionLink("Nuevo Itinerario", "Create") %>
</p>
<table>
    <tr>
        <th>
            Identificador Puerto de Partida
        </th>
        <th>
            Fecha de Partida
        </th>
        <th>
            Identificador Puerto de LLegada
        </th>
        <th>
            Fecha de Llegada
        </th>
        <th>
            Name
        </th>
        <th>
            Descripion
        </th>
        <th></th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.DeparturePortID) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.DepartureTime) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.ArrivalPortID) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.ArrivalTime) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Name) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Descripion) %>
        </td>
        <td>
            <%: Html.ActionLink("Detalles", "Details", new { id=item.ItineraryID }) %> |
            <%: Html.ActionLink("Eliminar", "Delete", new { id=item.ItineraryID }) %>
        </td>
    </tr>
<% } %>

</table>

</asp:Content>
